package com.lxb.store.service.Impl;

import com.lxb.store.dao.BuyGoodsDao;
import com.lxb.store.dao.ShopCarDao;
import com.lxb.store.entity.BuyGoods;
import com.lxb.store.entity.ShopCar;
import com.lxb.store.service.ShopCarService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ShopCarServiceImpl implements ShopCarService{

    @Autowired
    private ShopCarDao shopCarDao;

    @Autowired
    private BuyGoodsDao buyGoodsDao;

    @Override
    public ShopCar saveShopCar(ShopCar shopCar) {
        return shopCarDao.save(shopCar);
    }

    @Override
    public int addBuyGoodsNum(Integer id) {
        return buyGoodsDao.addBuyGoodsNum(id);
    }

    @Override
    public int subBuyGoodsNum(Integer id) {
        return buyGoodsDao.subBuyGoodsNum(id);
    }
}
